package com.lujieni.springbootoss.controller;

import com.aliyuncs.exceptions.ClientException;
import com.lujieni.springbootoss.utils.UploadUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author：小鹿爱吃鱼
 * @Date: 2025/4/20 18:44
 * @Description:
 */
@RestController
@RequiredArgsConstructor
public class UploadController {

    private final UploadUtils uploadUtils;

    @GetMapping(value = "/upload")
    public String uploadResource(MultipartFile file) throws ClientException {
        return uploadUtils.upload(file);
    }


}
